package com.aos.controller;

import com.aos.util.ValidateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName BaseController
 * @Description:基础控制器
 * @Author wumingwang
 * @Date 2018/9/18 14:48
 * @Version 1.0
 */
@Slf4j
@RestController
@Api(value = "Base Controller", tags = {"基础接口"})
public class BaseController {

    @Autowired
    private ValidateUtils validateUtils;

    /**
     * 获取验证码图片
     * @return
     */
    @ApiOperation(value = "获取验证码图片", notes = "获取验证码图片")
    @GetMapping("/base/v1/getCaptcha")
    public Object getCaptcha()  {
        return validateUtils.createCaptchaSaveInCache();
    }
}
